import request from "@/utils/request";
export function fetchList(params) {
  return request({
    url: "/dms/meal/list",
    method: "get",
    params: params,
  });
}

export function fetchAllList(params) {
  return request({
    url: "/dms/meal/getAllMeals",
    method: "get",
    params: params,
  });
}

export function createMeal(data) {
  return request({
    url: "/dms/meal/create",
    method: "post",
    data: data,
  });
}

export function deleteMeal(id) {
  return request({
    url: "/dms/meal/delete/" + id,
    method: "get",
  });
}

export function getMeal(id) {
  return request({
    url: "/dms/meal/" + id,
    method: "get",
  });
}

export function updateMeal(id, data) {
  return request({
    url: "/dms/meal/update/" + id,
    method: "post",
    data: data,
  });
}
